<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>create_trained_component_model [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_matching.html">Matching</a> / <a href="toc_matching_componentbased.html">Component-Based</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">create_trained_component_model</span><span data-if="c" style="display:none;">T_create_trained_component_model</span><span data-if="cpp" style="display:none;">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none;">CreateTrainedComponentModel</span><span data-if="python" style="display:none;">create_trained_component_model</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">create_trained_component_model</span><span data-if="c" style="display:none;">T_create_trained_component_model</span><span data-if="cpp" style="display:none;">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none;">CreateTrainedComponentModel</span><span data-if="python" style="display:none;">create_trained_component_model</span></code> — Prepare a component model for matching based on trained components.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>create_trained_component_model</b>( :  : <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, <a href="#AngleStart"><i>AngleStart</i></a>, <a href="#AngleExtent"><i>AngleExtent</i></a>, <a href="#MinContrastComp"><i>MinContrastComp</i></a>, <a href="#MinScoreComp"><i>MinScoreComp</i></a>, <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, <a href="#AngleStepComp"><i>AngleStepComp</i></a>, <a href="#OptimizationComp"><i>OptimizationComp</i></a>, <a href="#MetricComp"><i>MetricComp</i></a>, <a href="#PregenerationComp"><i>PregenerationComp</i></a> : <a href="#ComponentModelID"><i>ComponentModelID</i></a>, <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>T_create_trained_component_model</b>(const Htuple <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, const Htuple <a href="#AngleStart"><i>AngleStart</i></a>, const Htuple <a href="#AngleExtent"><i>AngleExtent</i></a>, const Htuple <a href="#MinContrastComp"><i>MinContrastComp</i></a>, const Htuple <a href="#MinScoreComp"><i>MinScoreComp</i></a>, const Htuple <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, const Htuple <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const Htuple <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const Htuple <a href="#MetricComp"><i>MetricComp</i></a>, const Htuple <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Htuple* <a href="#ComponentModelID"><i>ComponentModelID</i></a>, Htuple* <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>CreateTrainedComponentModel</b>(const HTuple&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, const HTuple&amp; <a href="#AngleStart"><i>AngleStart</i></a>, const HTuple&amp; <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#MinContrastComp"><i>MinContrastComp</i></a>, const HTuple&amp; <a href="#MinScoreComp"><i>MinScoreComp</i></a>, const HTuple&amp; <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, const HTuple&amp; <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HTuple&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HTuple&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HTuple&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>, HTuple* <a href="#ComponentModelID"><i>ComponentModelID</i></a>, HTuple* <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>::<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#MinContrastComp"><i>MinContrastComp</i></a>, const HTuple&amp; <a href="#MinScoreComp"><i>MinScoreComp</i></a>, const HTuple&amp; <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, const HTuple&amp; <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HTuple&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HTuple&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>, HTuple* <a href="#RootRanking"><i>RootRanking</i></a>) const</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>::<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HString&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HString&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>) const</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>::<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const char* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const char* <a href="#MetricComp"><i>MetricComp</i></a>, const char* <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>) const</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>::<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const wchar_t* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const wchar_t* <a href="#MetricComp"><i>MetricComp</i></a>, const wchar_t* <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
<p>
<code>void <a href="HComponentModel.html">HComponentModel</a>::<b>HComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#MinContrastComp"><i>MinContrastComp</i></a>, const HTuple&amp; <a href="#MinScoreComp"><i>MinScoreComp</i></a>, const HTuple&amp; <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, const HTuple&amp; <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HTuple&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HTuple&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>, HTuple* <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
<p>
<code>void <a href="HComponentModel.html">HComponentModel</a>::<b>HComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HString&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HString&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
<p>
<code>void <a href="HComponentModel.html">HComponentModel</a>::<b>HComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const char* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const char* <a href="#MetricComp"><i>MetricComp</i></a>, const char* <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>)</code></p>
<p>
<code>void <a href="HComponentModel.html">HComponentModel</a>::<b>HComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const wchar_t* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const wchar_t* <a href="#MetricComp"><i>MetricComp</i></a>, const wchar_t* <a href="#PregenerationComp"><i>PregenerationComp</i></a>, Hlong* <a href="#RootRanking"><i>RootRanking</i></a>)  <span class="signnote">
            (
            Windows only)
          </span></code></p>
<p>
<code><a href="HTuple.html">HTuple</a> <a href="HComponentModel.html">HComponentModel</a>::<b>CreateTrainedComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#MinContrastComp"><i>MinContrastComp</i></a>, const HTuple&amp; <a href="#MinScoreComp"><i>MinScoreComp</i></a>, const HTuple&amp; <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, const HTuple&amp; <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HTuple&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HTuple&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>)</code></p>
<p>
<code>Hlong <a href="HComponentModel.html">HComponentModel</a>::<b>CreateTrainedComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const HString&amp; <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const HString&amp; <a href="#MetricComp"><i>MetricComp</i></a>, const HString&amp; <a href="#PregenerationComp"><i>PregenerationComp</i></a>)</code></p>
<p>
<code>Hlong <a href="HComponentModel.html">HComponentModel</a>::<b>CreateTrainedComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const char* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const char* <a href="#MetricComp"><i>MetricComp</i></a>, const char* <a href="#PregenerationComp"><i>PregenerationComp</i></a>)</code></p>
<p>
<code>Hlong <a href="HComponentModel.html">HComponentModel</a>::<b>CreateTrainedComponentModel</b>(const HComponentTraining&amp; <a href="#ComponentTrainingID"><i>ComponentTrainingID</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, Hlong <a href="#MinContrastComp"><i>MinContrastComp</i></a>, double <a href="#MinScoreComp"><i>MinScoreComp</i></a>, Hlong <a href="#NumLevelsComp"><i>NumLevelsComp</i></a>, double <a href="#AngleStepComp"><i>AngleStepComp</i></a>, const wchar_t* <a href="#OptimizationComp"><i>OptimizationComp</i></a>, const wchar_t* <a href="#MetricComp"><i>MetricComp</i></a>, const wchar_t* <a href="#PregenerationComp"><i>PregenerationComp</i></a>)  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>CreateTrainedComponentModel</b>(<a href="HTuple.html">HTuple</a> <a href="#ComponentTrainingID"><i>componentTrainingID</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStart"><i>angleStart</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinContrastComp"><i>minContrastComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinScoreComp"><i>minScoreComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStepComp"><i>angleStepComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#OptimizationComp"><i>optimizationComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MetricComp"><i>metricComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#PregenerationComp"><i>pregenerationComp</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#ComponentModelID"><i>componentModelID</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#RootRanking"><i>rootRanking</i></a>)</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>.<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinContrastComp"><i>minContrastComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinScoreComp"><i>minScoreComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MetricComp"><i>metricComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#PregenerationComp"><i>pregenerationComp</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#RootRanking"><i>rootRanking</i></a>)</code></p>
<p>
<code><a href="HComponentModel.html">HComponentModel</a> <a href="HComponentTraining.html">HComponentTraining</a>.<b>CreateTrainedComponentModel</b>(double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, int <a href="#MinContrastComp"><i>minContrastComp</i></a>, double <a href="#MinScoreComp"><i>minScoreComp</i></a>, int <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, double <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, string <a href="#MetricComp"><i>metricComp</i></a>, string <a href="#PregenerationComp"><i>pregenerationComp</i></a>, out int <a href="#RootRanking"><i>rootRanking</i></a>)</code></p>
<p>
<code>public <a href="HComponentModel.html">HComponentModel</a>(<a href="HComponentTraining.html">HComponentTraining</a> <a href="#ComponentTrainingID"><i>componentTrainingID</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinContrastComp"><i>minContrastComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinScoreComp"><i>minScoreComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MetricComp"><i>metricComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#PregenerationComp"><i>pregenerationComp</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#RootRanking"><i>rootRanking</i></a>)</code></p>
<p>
<code>public <a href="HComponentModel.html">HComponentModel</a>(<a href="HComponentTraining.html">HComponentTraining</a> <a href="#ComponentTrainingID"><i>componentTrainingID</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, int <a href="#MinContrastComp"><i>minContrastComp</i></a>, double <a href="#MinScoreComp"><i>minScoreComp</i></a>, int <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, double <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, string <a href="#MetricComp"><i>metricComp</i></a>, string <a href="#PregenerationComp"><i>pregenerationComp</i></a>, out int <a href="#RootRanking"><i>rootRanking</i></a>)</code></p>
<p>
<code><a href="HTuple.html">HTuple</a> <a href="HComponentModel.html">HComponentModel</a>.<b>CreateTrainedComponentModel</b>(<a href="HComponentTraining.html">HComponentTraining</a> <a href="#ComponentTrainingID"><i>componentTrainingID</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinContrastComp"><i>minContrastComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinScoreComp"><i>minScoreComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MetricComp"><i>metricComp</i></a>, <a href="HTuple.html">HTuple</a> <a href="#PregenerationComp"><i>pregenerationComp</i></a>)</code></p>
<p>
<code>int <a href="HComponentModel.html">HComponentModel</a>.<b>CreateTrainedComponentModel</b>(<a href="HComponentTraining.html">HComponentTraining</a> <a href="#ComponentTrainingID"><i>componentTrainingID</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, int <a href="#MinContrastComp"><i>minContrastComp</i></a>, double <a href="#MinScoreComp"><i>minScoreComp</i></a>, int <a href="#NumLevelsComp"><i>numLevelsComp</i></a>, double <a href="#AngleStepComp"><i>angleStepComp</i></a>, string <a href="#OptimizationComp"><i>optimizationComp</i></a>, string <a href="#MetricComp"><i>metricComp</i></a>, string <a href="#PregenerationComp"><i>pregenerationComp</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>create_trained_component_model</b>(<a href="#ComponentTrainingID"><i>component_training_id</i></a>: HHandle, <a href="#AngleStart"><i>angle_start</i></a>: float, <a href="#AngleExtent"><i>angle_extent</i></a>: float, <a href="#MinContrastComp"><i>min_contrast_comp</i></a>: MaybeSequence[Union[int, str]], <a href="#MinScoreComp"><i>min_score_comp</i></a>: MaybeSequence[float], <a href="#NumLevelsComp"><i>num_levels_comp</i></a>: MaybeSequence[Union[int, str]], <a href="#AngleStepComp"><i>angle_step_comp</i></a>: MaybeSequence[Union[float, str]], <a href="#OptimizationComp"><i>optimization_comp</i></a>: str, <a href="#MetricComp"><i>metric_comp</i></a>: MaybeSequence[str], <a href="#PregenerationComp"><i>pregeneration_comp</i></a>: MaybeSequence[str]) -&gt; Tuple[HHandle, Sequence[int]]</code></p>
<p>
<code>def <b>create_trained_component_model_s</b>(<a href="#ComponentTrainingID"><i>component_training_id</i></a>: HHandle, <a href="#AngleStart"><i>angle_start</i></a>: float, <a href="#AngleExtent"><i>angle_extent</i></a>: float, <a href="#MinContrastComp"><i>min_contrast_comp</i></a>: MaybeSequence[Union[int, str]], <a href="#MinScoreComp"><i>min_score_comp</i></a>: MaybeSequence[float], <a href="#NumLevelsComp"><i>num_levels_comp</i></a>: MaybeSequence[Union[int, str]], <a href="#AngleStepComp"><i>angle_step_comp</i></a>: MaybeSequence[Union[float, str]], <a href="#OptimizationComp"><i>optimization_comp</i></a>: str, <a href="#MetricComp"><i>metric_comp</i></a>: MaybeSequence[str], <a href="#PregenerationComp"><i>pregeneration_comp</i></a>: MaybeSequence[str]) -&gt; Tuple[HHandle, int]</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p><code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code> prepares the training result,
which is passed in <a href="#ComponentTrainingID"><i><code><span data-if="hdevelop" style="display:inline">ComponentTrainingID</span><span data-if="c" style="display:none">ComponentTrainingID</span><span data-if="cpp" style="display:none">ComponentTrainingID</span><span data-if="com" style="display:none">ComponentTrainingID</span><span data-if="dotnet" style="display:none">componentTrainingID</span><span data-if="python" style="display:none">component_training_id</span></code></i></a>, as a component
model for matching. The output parameter <a href="#ComponentModelID"><i><code><span data-if="hdevelop" style="display:inline">ComponentModelID</span><span data-if="c" style="display:none">ComponentModelID</span><span data-if="cpp" style="display:none">ComponentModelID</span><span data-if="com" style="display:none">ComponentModelID</span><span data-if="dotnet" style="display:none">componentModelID</span><span data-if="python" style="display:none">component_model_id</span></code></i></a>
is a handle for this model, which is used in subsequent calls to
<a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a>. In contrast to
<a href="create_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></code></a>, the model components must have been
previously trained using <a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a> before
calling <code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code>.
</p>
<p>The parameters <a href="#AngleStart"><i><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></i></a> and <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a>
determine the range of possible rotations of the component model in
an image.
</p>
<p>Internally, a separate shape model is built for each model component
(see <a href="create_shape_model.html"><code><span data-if="hdevelop" style="display:inline">create_shape_model</span><span data-if="c" style="display:none">create_shape_model</span><span data-if="cpp" style="display:none">CreateShapeModel</span><span data-if="com" style="display:none">CreateShapeModel</span><span data-if="dotnet" style="display:none">CreateShapeModel</span><span data-if="python" style="display:none">create_shape_model</span></code></a>). Therefore, the parameters
<a href="#MinContrastComp"><i><code><span data-if="hdevelop" style="display:inline">MinContrastComp</span><span data-if="c" style="display:none">MinContrastComp</span><span data-if="cpp" style="display:none">MinContrastComp</span><span data-if="com" style="display:none">MinContrastComp</span><span data-if="dotnet" style="display:none">minContrastComp</span><span data-if="python" style="display:none">min_contrast_comp</span></code></i></a>, <a href="#MinScoreComp"><i><code><span data-if="hdevelop" style="display:inline">MinScoreComp</span><span data-if="c" style="display:none">MinScoreComp</span><span data-if="cpp" style="display:none">MinScoreComp</span><span data-if="com" style="display:none">MinScoreComp</span><span data-if="dotnet" style="display:none">minScoreComp</span><span data-if="python" style="display:none">min_score_comp</span></code></i></a>,
<a href="#NumLevelsComp"><i><code><span data-if="hdevelop" style="display:inline">NumLevelsComp</span><span data-if="c" style="display:none">NumLevelsComp</span><span data-if="cpp" style="display:none">NumLevelsComp</span><span data-if="com" style="display:none">NumLevelsComp</span><span data-if="dotnet" style="display:none">numLevelsComp</span><span data-if="python" style="display:none">num_levels_comp</span></code></i></a>, <a href="#AngleStepComp"><i><code><span data-if="hdevelop" style="display:inline">AngleStepComp</span><span data-if="c" style="display:none">AngleStepComp</span><span data-if="cpp" style="display:none">AngleStepComp</span><span data-if="com" style="display:none">AngleStepComp</span><span data-if="dotnet" style="display:none">angleStepComp</span><span data-if="python" style="display:none">angle_step_comp</span></code></i></a>,
<a href="#OptimizationComp"><i><code><span data-if="hdevelop" style="display:inline">OptimizationComp</span><span data-if="c" style="display:none">OptimizationComp</span><span data-if="cpp" style="display:none">OptimizationComp</span><span data-if="com" style="display:none">OptimizationComp</span><span data-if="dotnet" style="display:none">optimizationComp</span><span data-if="python" style="display:none">optimization_comp</span></code></i></a>, <a href="#MetricComp"><i><code><span data-if="hdevelop" style="display:inline">MetricComp</span><span data-if="c" style="display:none">MetricComp</span><span data-if="cpp" style="display:none">MetricComp</span><span data-if="com" style="display:none">MetricComp</span><span data-if="dotnet" style="display:none">metricComp</span><span data-if="python" style="display:none">metric_comp</span></code></i></a>, and
<a href="#PregenerationComp"><i><code><span data-if="hdevelop" style="display:inline">PregenerationComp</span><span data-if="c" style="display:none">PregenerationComp</span><span data-if="cpp" style="display:none">PregenerationComp</span><span data-if="com" style="display:none">PregenerationComp</span><span data-if="dotnet" style="display:none">pregenerationComp</span><span data-if="python" style="display:none">pregeneration_comp</span></code></i></a> correspond to the parameters of
<a href="create_shape_model.html"><code><span data-if="hdevelop" style="display:inline">create_shape_model</span><span data-if="c" style="display:none">create_shape_model</span><span data-if="cpp" style="display:none">CreateShapeModel</span><span data-if="com" style="display:none">CreateShapeModel</span><span data-if="dotnet" style="display:none">CreateShapeModel</span><span data-if="python" style="display:none">create_shape_model</span></code></a>, with the following differences: First,
the parameter <code><span data-if="hdevelop" style="display:inline">Optimization</span><span data-if="c" style="display:none">Optimization</span><span data-if="cpp" style="display:none">Optimization</span><span data-if="com" style="display:none">Optimization</span><span data-if="dotnet" style="display:none">optimization</span><span data-if="python" style="display:none">optimization</span></code> of <a href="create_shape_model.html"><code><span data-if="hdevelop" style="display:inline">create_shape_model</span><span data-if="c" style="display:none">create_shape_model</span><span data-if="cpp" style="display:none">CreateShapeModel</span><span data-if="com" style="display:none">CreateShapeModel</span><span data-if="dotnet" style="display:none">CreateShapeModel</span><span data-if="python" style="display:none">create_shape_model</span></code></a>
provides the possibility to reduce the number of model points as
well as the possibility to completely pregenerate the shape
model. In contrast, 该算子
<code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code> uses a separate parameter
<a href="#PregenerationComp"><i><code><span data-if="hdevelop" style="display:inline">PregenerationComp</span><span data-if="c" style="display:none">PregenerationComp</span><span data-if="cpp" style="display:none">PregenerationComp</span><span data-if="com" style="display:none">PregenerationComp</span><span data-if="dotnet" style="display:none">pregenerationComp</span><span data-if="python" style="display:none">pregeneration_comp</span></code></i></a> in order to decide whether the shape
models should be completely pregenerated or not. A second difference
concerning the parameter <a href="#MinScoreComp"><i><code><span data-if="hdevelop" style="display:inline">MinScoreComp</span><span data-if="c" style="display:none">MinScoreComp</span><span data-if="cpp" style="display:none">MinScoreComp</span><span data-if="com" style="display:none">MinScoreComp</span><span data-if="dotnet" style="display:none">minScoreComp</span><span data-if="python" style="display:none">min_score_comp</span></code></i></a> should be noted. When
using the shape-based matching, this parameter needs not be passed
when preparing the shape model using <a href="create_shape_model.html"><code><span data-if="hdevelop" style="display:inline">create_shape_model</span><span data-if="c" style="display:none">create_shape_model</span><span data-if="cpp" style="display:none">CreateShapeModel</span><span data-if="com" style="display:none">CreateShapeModel</span><span data-if="dotnet" style="display:none">CreateShapeModel</span><span data-if="python" style="display:none">create_shape_model</span></code></a> but
only during the search using <a href="find_shape_model.html"><code><span data-if="hdevelop" style="display:inline">find_shape_model</span><span data-if="c" style="display:none">find_shape_model</span><span data-if="cpp" style="display:none">FindShapeModel</span><span data-if="com" style="display:none">FindShapeModel</span><span data-if="dotnet" style="display:none">FindShapeModel</span><span data-if="python" style="display:none">find_shape_model</span></code></a>. In contrast,
when preparing the component model it is favorable to analyze
rotational symmetries of the model components and similarities
between the model components. However, this analysis only leads to
meaningful results if the value for <a href="#MinScoreComp"><i><code><span data-if="hdevelop" style="display:inline">MinScoreComp</span><span data-if="c" style="display:none">MinScoreComp</span><span data-if="cpp" style="display:none">MinScoreComp</span><span data-if="com" style="display:none">MinScoreComp</span><span data-if="dotnet" style="display:none">minScoreComp</span><span data-if="python" style="display:none">min_score_comp</span></code></i></a> that is
used during the search (see <a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a>) is already
approximately known. After the search with
<a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a> the pose parameters of the components
in a search image are returned. Note that the pose parameters refer
to the reference points of the components. The reference point of a
component is the center of gravity of its associated region that is
returned in <code><span data-if="hdevelop" style="display:inline">ModelComponents</span><span data-if="c" style="display:none">ModelComponents</span><span data-if="cpp" style="display:none">ModelComponents</span><span data-if="com" style="display:none">ModelComponents</span><span data-if="dotnet" style="display:none">modelComponents</span><span data-if="python" style="display:none">model_components</span></code> of
<a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a>.
</p>
<p>The parameters <a href="#MinContrastComp"><i><code><span data-if="hdevelop" style="display:inline">MinContrastComp</span><span data-if="c" style="display:none">MinContrastComp</span><span data-if="cpp" style="display:none">MinContrastComp</span><span data-if="com" style="display:none">MinContrastComp</span><span data-if="dotnet" style="display:none">minContrastComp</span><span data-if="python" style="display:none">min_contrast_comp</span></code></i></a>, <a href="#NumLevelsComp"><i><code><span data-if="hdevelop" style="display:inline">NumLevelsComp</span><span data-if="c" style="display:none">NumLevelsComp</span><span data-if="cpp" style="display:none">NumLevelsComp</span><span data-if="com" style="display:none">NumLevelsComp</span><span data-if="dotnet" style="display:none">numLevelsComp</span><span data-if="python" style="display:none">num_levels_comp</span></code></i></a>,
<a href="#AngleStepComp"><i><code><span data-if="hdevelop" style="display:inline">AngleStepComp</span><span data-if="c" style="display:none">AngleStepComp</span><span data-if="cpp" style="display:none">AngleStepComp</span><span data-if="com" style="display:none">AngleStepComp</span><span data-if="dotnet" style="display:none">angleStepComp</span><span data-if="python" style="display:none">angle_step_comp</span></code></i></a>, and <a href="#OptimizationComp"><i><code><span data-if="hdevelop" style="display:inline">OptimizationComp</span><span data-if="c" style="display:none">OptimizationComp</span><span data-if="cpp" style="display:none">OptimizationComp</span><span data-if="com" style="display:none">OptimizationComp</span><span data-if="dotnet" style="display:none">optimizationComp</span><span data-if="python" style="display:none">optimization_comp</span></code></i></a> can be
automatically determined by passing <i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i> for the
respective parameters.
</p>
<p>All component-specific input parameters (parameter names terminate
with the suffix <code>Comp</code>) must either contain one element, in
which case the parameter is used for all model components, or must
contain the same number of elements as the number of model
components contained in <a href="#ComponentTrainingID"><i><code><span data-if="hdevelop" style="display:inline">ComponentTrainingID</span><span data-if="c" style="display:none">ComponentTrainingID</span><span data-if="cpp" style="display:none">ComponentTrainingID</span><span data-if="com" style="display:none">ComponentTrainingID</span><span data-if="dotnet" style="display:none">componentTrainingID</span><span data-if="python" style="display:none">component_training_id</span></code></i></a>, in which case
each parameter element refers to the corresponding component in
<a href="#ComponentTrainingID"><i><code><span data-if="hdevelop" style="display:inline">ComponentTrainingID</span><span data-if="c" style="display:none">ComponentTrainingID</span><span data-if="cpp" style="display:none">ComponentTrainingID</span><span data-if="com" style="display:none">ComponentTrainingID</span><span data-if="dotnet" style="display:none">componentTrainingID</span><span data-if="python" style="display:none">component_training_id</span></code></i></a>.
</p>
<p>In addition to the individual shape models, the component model also
contains information about the way the single model components must
be searched relative to each other using
<a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a> in order to minimize the computation
time of the search. For this, the components are represented in a
tree structure.  First, the component that stands at the root of
this search tree (root component) is searched. Then, the remaining
components are searched relative to the pose of their predecessor in
the search tree.
</p>
<p>The root component can be passed as an input parameter of
<a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a> during the search. To what extent a model
component is suited to act as root component depends on several factors.  In
principle, a model component that can be found in the image with a high
probability should be chosen. Therefore, a component that is sometimes
occluded to a high degree or that is missing in some cases is not well suited
to act as root component. Additionally, the computation time that is
associated with the root component during the search can serve as a
criterion. A ranking of the model components that is based on the latter
criterion is returned in <a href="#RootRanking"><i><code><span data-if="hdevelop" style="display:inline">RootRanking</span><span data-if="c" style="display:none">RootRanking</span><span data-if="cpp" style="display:none">RootRanking</span><span data-if="com" style="display:none">RootRanking</span><span data-if="dotnet" style="display:none">rootRanking</span><span data-if="python" style="display:none">root_ranking</span></code></i></a>.  In this parameter the indices
of the model components are sorted in descending order according to their
associated computation time, i.e., <a href="#RootRanking"><i><code><span data-if="hdevelop" style="display:inline">RootRanking</span><span data-if="c" style="display:none">RootRanking</span><span data-if="cpp" style="display:none">RootRanking</span><span data-if="com" style="display:none">RootRanking</span><span data-if="dotnet" style="display:none">rootRanking</span><span data-if="python" style="display:none">root_ranking</span></code></i></a>[0] contains the index
of the model component that, chosen as root component, allows the fastest
search. Note that the ranking returned in <a href="#RootRanking"><i><code><span data-if="hdevelop" style="display:inline">RootRanking</span><span data-if="c" style="display:none">RootRanking</span><span data-if="cpp" style="display:none">RootRanking</span><span data-if="com" style="display:none">RootRanking</span><span data-if="dotnet" style="display:none">rootRanking</span><span data-if="python" style="display:none">root_ranking</span></code></i></a> represents
only a coarse estimation. Furthermore, the calculation of the root ranking
assumes that the image size as well as the value of the system parameter
<i><span data-if="hdevelop" style="display:inline">'border_shape_models'</span><span data-if="c" style="display:none">"border_shape_models"</span><span data-if="cpp" style="display:none">"border_shape_models"</span><span data-if="com" style="display:none">"border_shape_models"</span><span data-if="dotnet" style="display:none">"border_shape_models"</span><span data-if="python" style="display:none">"border_shape_models"</span></i> are identical when calling
<code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code> and <a href="find_component_model.html"><code><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></code></a>.</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  <li>未经并行化处理。</li>
</ul>
<p>This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.</p>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="ComponentTrainingID" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ComponentTrainingID</span><span data-if="c" style="display:none">ComponentTrainingID</span><span data-if="cpp" style="display:none">ComponentTrainingID</span><span data-if="com" style="display:none">ComponentTrainingID</span><span data-if="dotnet" style="display:none">componentTrainingID</span><span data-if="python" style="display:none">component_training_id</span></code></b> (input_control)  </span><span>component_training <code>→</code> <span data-if="dotnet" style="display:none"><a href="HComponentTraining.html">HComponentTraining</a>, </span><span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">HHandle</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (handle)</span><span data-if="dotnet" style="display:none"> (<i>IntPtr</i>)</span><span data-if="cpp" style="display:none"> (<i>HHandle</i>)</span><span data-if="c" style="display:none"> (<i>handle</i>)</span></span>
</div>
<p class="pardesc">Handle of the training result.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleStart" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></b> (input_control)  </span><span>angle.rad <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Smallest rotation of the component model.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>-0.39</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>-3.14, -1.57, -0.79, -0.39, -0.20, 0.0</p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleExtent" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></b> (input_control)  </span><span>angle.rad <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Extent of the rotation of the component model.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>0.79</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>6.28, 3.14, 1.57, 0.79, 0.39</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>AngleExtent &gt;= 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="MinContrastComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MinContrastComp</span><span data-if="c" style="display:none">MinContrastComp</span><span data-if="cpp" style="display:none">MinContrastComp</span><span data-if="com" style="display:none">MinContrastComp</span><span data-if="dotnet" style="display:none">minContrastComp</span><span data-if="python" style="display:none">min_contrast_comp</span></code></b> (input_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Minimum contrast of the components in the search
images.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 10, 20, 20, 40</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>MinContrastComp &gt;= 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="MinScoreComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MinScoreComp</span><span data-if="c" style="display:none">MinScoreComp</span><span data-if="cpp" style="display:none">MinScoreComp</span><span data-if="com" style="display:none">MinScoreComp</span><span data-if="dotnet" style="display:none">minScoreComp</span><span data-if="python" style="display:none">min_score_comp</span></code></b> (input_control)  </span><span>real(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[float]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Minimum score of the instances of the components to
be found.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>0.5</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0</p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>0.01</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>0.05</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>0 &lt;= MinScoreComp &amp;&amp; MinScoreComp &lt;= 1</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="NumLevelsComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">NumLevelsComp</span><span data-if="c" style="display:none">NumLevelsComp</span><span data-if="cpp" style="display:none">NumLevelsComp</span><span data-if="com" style="display:none">NumLevelsComp</span><span data-if="dotnet" style="display:none">numLevelsComp</span><span data-if="python" style="display:none">num_levels_comp</span></code></b> (input_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Maximum number of pyramid levels for the components.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span>1, 2, 3, 4, 5, 6, 7, 8, 9, 10, <span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleStepComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleStepComp</span><span data-if="c" style="display:none">AngleStepComp</span><span data-if="cpp" style="display:none">AngleStepComp</span><span data-if="com" style="display:none">AngleStepComp</span><span data-if="dotnet" style="display:none">angleStepComp</span><span data-if="python" style="display:none">angle_step_comp</span></code></b> (input_control)  </span><span>angle.rad(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[float, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>double</i> / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>double</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>double</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Step length of the angles (resolution) for the
components.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 0.0175, 0.0349, 0.0524, 0.0698, 0.0873</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>AngleStepComp &gt;= 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="OptimizationComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">OptimizationComp</span><span data-if="c" style="display:none">OptimizationComp</span><span data-if="cpp" style="display:none">OptimizationComp</span><span data-if="com" style="display:none">OptimizationComp</span><span data-if="dotnet" style="display:none">optimizationComp</span><span data-if="python" style="display:none">optimization_comp</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Kind of optimization for the components.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, <span data-if="hdevelop" style="display:inline">'none'</span><span data-if="c" style="display:none">"none"</span><span data-if="cpp" style="display:none">"none"</span><span data-if="com" style="display:none">"none"</span><span data-if="dotnet" style="display:none">"none"</span><span data-if="python" style="display:none">"none"</span>, <span data-if="hdevelop" style="display:inline">'point_reduction_high'</span><span data-if="c" style="display:none">"point_reduction_high"</span><span data-if="cpp" style="display:none">"point_reduction_high"</span><span data-if="com" style="display:none">"point_reduction_high"</span><span data-if="dotnet" style="display:none">"point_reduction_high"</span><span data-if="python" style="display:none">"point_reduction_high"</span>, <span data-if="hdevelop" style="display:inline">'point_reduction_low'</span><span data-if="c" style="display:none">"point_reduction_low"</span><span data-if="cpp" style="display:none">"point_reduction_low"</span><span data-if="com" style="display:none">"point_reduction_low"</span><span data-if="dotnet" style="display:none">"point_reduction_low"</span><span data-if="python" style="display:none">"point_reduction_low"</span>, <span data-if="hdevelop" style="display:inline">'point_reduction_medium'</span><span data-if="c" style="display:none">"point_reduction_medium"</span><span data-if="cpp" style="display:none">"point_reduction_medium"</span><span data-if="com" style="display:none">"point_reduction_medium"</span><span data-if="dotnet" style="display:none">"point_reduction_medium"</span><span data-if="python" style="display:none">"point_reduction_medium"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="MetricComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MetricComp</span><span data-if="c" style="display:none">MetricComp</span><span data-if="cpp" style="display:none">MetricComp</span><span data-if="com" style="display:none">MetricComp</span><span data-if="dotnet" style="display:none">metricComp</span><span data-if="python" style="display:none">metric_comp</span></code></b> (input_control)  </span><span>string(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Match metric used for the components.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'use_polarity'</span>
    <span data-if="c" style="display:none">"use_polarity"</span>
    <span data-if="cpp" style="display:none">"use_polarity"</span>
    <span data-if="com" style="display:none">"use_polarity"</span>
    <span data-if="dotnet" style="display:none">"use_polarity"</span>
    <span data-if="python" style="display:none">"use_polarity"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'ignore_color_polarity'</span><span data-if="c" style="display:none">"ignore_color_polarity"</span><span data-if="cpp" style="display:none">"ignore_color_polarity"</span><span data-if="com" style="display:none">"ignore_color_polarity"</span><span data-if="dotnet" style="display:none">"ignore_color_polarity"</span><span data-if="python" style="display:none">"ignore_color_polarity"</span>, <span data-if="hdevelop" style="display:inline">'ignore_global_polarity'</span><span data-if="c" style="display:none">"ignore_global_polarity"</span><span data-if="cpp" style="display:none">"ignore_global_polarity"</span><span data-if="com" style="display:none">"ignore_global_polarity"</span><span data-if="dotnet" style="display:none">"ignore_global_polarity"</span><span data-if="python" style="display:none">"ignore_global_polarity"</span>, <span data-if="hdevelop" style="display:inline">'ignore_local_polarity'</span><span data-if="c" style="display:none">"ignore_local_polarity"</span><span data-if="cpp" style="display:none">"ignore_local_polarity"</span><span data-if="com" style="display:none">"ignore_local_polarity"</span><span data-if="dotnet" style="display:none">"ignore_local_polarity"</span><span data-if="python" style="display:none">"ignore_local_polarity"</span>, <span data-if="hdevelop" style="display:inline">'use_polarity'</span><span data-if="c" style="display:none">"use_polarity"</span><span data-if="cpp" style="display:none">"use_polarity"</span><span data-if="com" style="display:none">"use_polarity"</span><span data-if="dotnet" style="display:none">"use_polarity"</span><span data-if="python" style="display:none">"use_polarity"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="PregenerationComp" class="parname"><b><code><span data-if="hdevelop" style="display:inline">PregenerationComp</span><span data-if="c" style="display:none">PregenerationComp</span><span data-if="cpp" style="display:none">PregenerationComp</span><span data-if="com" style="display:none">PregenerationComp</span><span data-if="dotnet" style="display:none">pregenerationComp</span><span data-if="python" style="display:none">pregeneration_comp</span></code></b> (input_control)  </span><span>string(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Complete pregeneration of the shape models for the
components if equal to <i><span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></i>.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'false'</span>
    <span data-if="c" style="display:none">"false"</span>
    <span data-if="cpp" style="display:none">"false"</span>
    <span data-if="com" style="display:none">"false"</span>
    <span data-if="dotnet" style="display:none">"false"</span>
    <span data-if="python" style="display:none">"false"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'false'</span><span data-if="c" style="display:none">"false"</span><span data-if="cpp" style="display:none">"false"</span><span data-if="com" style="display:none">"false"</span><span data-if="dotnet" style="display:none">"false"</span><span data-if="python" style="display:none">"false"</span>, <span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="ComponentModelID" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ComponentModelID</span><span data-if="c" style="display:none">ComponentModelID</span><span data-if="cpp" style="display:none">ComponentModelID</span><span data-if="com" style="display:none">ComponentModelID</span><span data-if="dotnet" style="display:none">componentModelID</span><span data-if="python" style="display:none">component_model_id</span></code></b> (output_control)  </span><span>component_model <code>→</code> <span data-if="dotnet" style="display:none"><a href="HComponentModel.html">HComponentModel</a>, </span><span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">HHandle</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (handle)</span><span data-if="dotnet" style="display:none"> (<i>IntPtr</i>)</span><span data-if="cpp" style="display:none"> (<i>HHandle</i>)</span><span data-if="c" style="display:none"> (<i>handle</i>)</span></span>
</div>
<p class="pardesc">Handle of the component model.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="RootRanking" class="parname"><b><code><span data-if="hdevelop" style="display:inline">RootRanking</span><span data-if="c" style="display:none">RootRanking</span><span data-if="cpp" style="display:none">RootRanking</span><span data-if="com" style="display:none">RootRanking</span><span data-if="dotnet" style="display:none">rootRanking</span><span data-if="python" style="display:none">root_ranking</span></code></b> (output_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Sequence[int]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Ranking of the model components expressing the
suitability to act as the root component.</p>
</div>
<h2 id="sec_example_all">例程 (HDevelop)</h2>
<pre class="example">
* Get the model image.
read_image (ModelImage, 'model_image.tif')
* Define the regions for the initial components.
gen_rectangle2 (InitialComponentRegions, 212, 233, 0.62, 167, 29)
gen_rectangle2 (Rectangle2, 298, 363, 1.17, 162, 34)
gen_rectangle2 (Rectangle3, 63, 444, -0.26, 50, 27)
gen_rectangle2 (Rectangle4, 120, 473, 0, 33, 20)
concat_obj (InitialComponentRegions, Rectangle2, InitialComponentRegions)
concat_obj (InitialComponentRegions, Rectangle3, InitialComponentRegions)
concat_obj (InitialComponentRegions, Rectangle4, InitialComponentRegions)
* Get the training images.
gen_empty_obj (TrainingImages)
for i := 1 to 4 by 1
    read_image (TrainingImage, 'training_image-'+i+'.tif')
    concat_obj (TrainingImages, TrainingImage, TrainingImages)
endfor
* Extract the model components and train the relations.
train_model_components (ModelImage, InitialComponentRegions, \
                        TrainingImages, ModelComponents, 22, 60, 30, 0.65, \
                        0, 0, rad(60), 'speed', 'rigidity', 0.2, 0.4, \
                        ComponentTrainingID)
* Create the component model based on the training result.
create_trained_component_model (ComponentTrainingID, -rad(30), rad(60), 10, \
                                0.5, 'auto', 'auto', 'none', \
                                'use_polarity', 'false', ComponentModelID, \
                                RootRanking)
* Find the component model in a run-time image.
read_image (SearchImage, 'search_image.tif')
find_component_model (SearchImage, ComponentModelID, RootRanking, -rad(30), \
                      rad(60), 0.5, 0, 0.5, 'stop_search', 'prune_branch', \
                      'none', 0.55, 'least_squares', 0, 0.9, ModelStart, \
                      ModelEnd, Score, RowComp, ColumnComp, AngleComp, \
                      ScoreComp, ModelComp)
</pre>
<h2 id="sec_result">结果</h2>
<p>如果参数均有效，算子
<code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code> 返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .  If
necessary an exception is raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="train_model_components.html"><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></a></code>, 
<code><a href="read_training_components.html"><span data-if="hdevelop" style="display:inline">read_training_components</span><span data-if="c" style="display:none">read_training_components</span><span data-if="cpp" style="display:none">ReadTrainingComponents</span><span data-if="com" style="display:none">ReadTrainingComponents</span><span data-if="dotnet" style="display:none">ReadTrainingComponents</span><span data-if="python" style="display:none">read_training_components</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="find_component_model.html"><span data-if="hdevelop" style="display:inline">find_component_model</span><span data-if="c" style="display:none">find_component_model</span><span data-if="cpp" style="display:none">FindComponentModel</span><span data-if="com" style="display:none">FindComponentModel</span><span data-if="dotnet" style="display:none">FindComponentModel</span><span data-if="python" style="display:none">find_component_model</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="create_component_model.html"><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Matching</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
